<?php

use home\assets\PageAsset;
use home\models\Timeline;

/* @var $this yii\web\View */
/* @var $data \home\models\Timeline[] */

$this->title = 'Biffar News';

PageAsset::register($this)->init([
    'css' => [
        'css/timeline.css',
    ],
]);
?>

<div class="page-body">
    <div class="topbar" style="background-image: url('img/inner-page/timeline.jpg')"></div>

    <div class="container clearfix">
        <div class="sidebar">
            <h1>News</h1>
            <h3>Biffar事记</h3>
        </div>

        <div class="timeline-list">
            <?php foreach ($data as $datum) { ?>
            <dl>
                <dt><?= $datum->showDate() ?></dt>
                <dd>
                    <?php if ($datum->case) { ?>
                    <img src="<?= $datum->case->getPreviewUrl(266, 172) ?>" />
                    <?php } ?>
                    <div class="content">
                        <h3><?= $datum->name ?></h3>
                        <p><?= $datum->showSummary() ?></p>
                        <a href="<?= $datum->getViewUrl() ?>">详情 <span class="iconfont icon-next"></span></a>
                    </div>
                </dd>
            </dl>
            <?php } ?>
        </div>
    </div>
</div>
